﻿using System.Configuration;

namespace Altairis.MailToolkit.Configuration {

    public class ListManagerElement : ConfigurationElement {

        [ConfigurationProperty("verificationKey", IsRequired = true, DefaultValue = "OelRcHU1zAwwdKdGHYpbijXqol8ph2qV0lqwlz9+rb8VzDnu8N4BPDl/jI2+mnwCuBD3ArYffzkxWR96nFdaFA==")]
        [RegexStringValidator(@"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$")]
        public string VerificationKey {
            get { return (string)this["verificationKey"]; }
            set { this["verificationKey"] = value; }
        }

        [ConfigurationProperty("transportProviderName", IsRequired = false, DefaultValue = "")]
        public string TransportProviderName {
            get { return (string)this["transportProviderName"]; }
            set { this["transportProviderName"] = value; }
        }

        [ConfigurationProperty("lists")]
        public ProviderSettingsCollection Lists {
            get { return (ProviderSettingsCollection)this["lists"]; }
            set { this["lists"] = value; }
        }
    }
}